<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

<h:head>
</h:head>

<h:body>
	<ui:composition template="_template.xhtml">
		<ui:define name="corpo">
		<h:form id="formAluno">
		
				<h2>Cadastro de Professor</h2>
      	
      			<br/>
      			
      			
      			<h:panelGrid columns="8"> 
					<h:outputLabel value="Nome Completo* "/>			
					<h:inputText id="name" value="#{professorBean.professor.nomeCompleto}" size="50"/>


					<h:outputLabel value="Data de Nascimento*" />

					<h:selectOneMenu value="#{professorBean.dataConversao.dia}">
						<f:selectItem itemLabel="" noSelectionOption="true" />
						<f:selectItems value="#{professorBean.dataConversao.dias}"
							var="dia" itemLabel="#{dia}" itemValue="#{dia}" />
					</h:selectOneMenu>&nbsp;/
							<h:selectOneMenu value="#{professorBean.dataConversao.mes}">
						<f:selectItem itemLabel="" noSelectionOption="true" />
						<f:selectItems value="#{professorBean.dataConversao.meses}"
							var="mes" itemLabel="#{mes}" itemValue="#{mes}" />
					</h:selectOneMenu>&nbsp;/
							<h:selectOneMenu value="#{professorBean.dataConversao.ano}">
						<f:selectItem itemLabel="" noSelectionOption="true" />
						<f:selectItems value="#{professorBean.dataConversao.anos}"
							var="ano" itemLabel="#{ano}" itemValue="#{ano}" />
					</h:selectOneMenu>
				</h:panelGrid>
				      
				      
				<br/>				     
				      					
				<h:panelGrid columns="4"> 
				<h:outputLabel value="E-mail* "/>			
				<h:inputText id="email" value="#{professorBean.professor.email}" size="50"/>	
				
				<h:outputLabel value="Nacionalidade* "/>	
				<h:selectOneMenu id="Nacionalidade" value="#{professorBean.professor.nacionalidade}">
						<f:selectItem itemLabel=":: Selecione ::" noSelectionOption="true" />
						<f:selectItem itemLabel="Brasileira" itemValue="BRASILEIRA" />
						<f:selectItem itemLabel="Estrangeira" itemValue="ESTRANGEIRA" />
						</h:selectOneMenu>
						
						<h:outputLabel value="Escolaridade* "/>	
						<h:selectOneMenu id="Escolaridade" value="#{professorBean.professor.escolaridade}">
						<f:selectItem itemLabel=":: Selecione ::" noSelectionOption="true" />
						<f:selectItem itemLabel="Médio" itemValue="MÉDIO" />
						<f:selectItem itemLabel="Magistério" itemValue="MAGISTÉRIO" />
						<f:selectItem itemLabel="Superior Incompleto" itemValue="SUPERIOR INCOMPLETO" />
						<f:selectItem itemLabel="Superior Completo" itemValue="SUPERIOR COMPLETO" />
						</h:selectOneMenu>
						
				</h:panelGrid>

				<br/>				     
				
				
				<h:panelGrid columns="10">
					<h:outputLabel value="Sexo* " />
					<h:selectOneMenu id="Sexo" value="#{professorBean.professor.sexo}">
						<f:selectItem itemLabel=":: Selecione ::" noSelectionOption="true" />
						<f:selectItem itemLabel="Feminino" itemValue="FEMINIMNO" />
						<f:selectItem itemLabel="Masculino" itemValue="MASCULINO" />
						</h:selectOneMenu>
						
						<h:outputLabel value="Cor* " />
					<h:selectOneMenu id="Cor" value="#{professorBean.professor.cor}">
						<f:selectItem itemLabel=":: Selecione ::" noSelectionOption="true" />
						<f:selectItem itemLabel="Branca" itemValue="BRANCO" />
						<f:selectItem itemLabel="Parda" itemValue="PARDA" />
					</h:selectOneMenu>

					<br />


				
				</h:panelGrid>


				<br />

				<h:panelGrid columns="4"> 
				<h:outputLabel value="Nome da Mãe* "/>			
				<h:inputText id="mae" value="#{professorBean.professor.nomeMae}" size="50"/>
				
				<h:outputLabel value="Nome do Pai "/>			
				<h:inputText id="pai" value="#{professorBean.professor.nomePai}" size="50"/>	
				</h:panelGrid>

	<h:outputLabel value="UF de Nascimento* " />
	<h:selectOneMenu id="unidadefederacao" value="#{professorBean.professor.unifNascto}" converter="genericConverter">
		<f:selectItem itemLabel=":: Selecione ::" noSelectionOption="true" />
		<f:selectItems value="#{unidadeFederacaoBean.unidadefederacoes}" var="unidadefederacao"
			itemLabel="#{unidadefederacao.sigla}" itemValue="#{unidadefederacao}" />
	</h:selectOneMenu>



				<p:commandButton value="Salvar" action="#{professorBean.salvar}" update="@form"/>
				<p:commandButton value="Voltar" />
				<br/><br/>
				
			
			<br/>
		</h:form>
		
		
		</ui:define>
	</ui:composition>

</h:body>
</html>